package com.sywb.chuangyebao.contract;

import android.view.View;

public interface CommonContract {

    interface CommonView extends BaseRefreshContract.View {
        int getType();
    }

    class CommonPresenter extends BaseRefreshContract.Presenter<CommonView> {

        private int type;
        private int pageNumber = 1;

        @Override
        public void onStart() {
            super.onStart();
            type = mView.getType();

//            recyclerAdapter = new NewsAdapter(mActivity);
//            setRecyclerAdapter(recyclerAdapter);
//            if (uId > 0) {
//                pullToRefreshView.setRefreshEnable(false);
//            }

            initData();
        }

        @Override
        public void initData() {
            onStartAsync();
            getHttpData();
        }

        @Override
        public void onStartRefresh() {
            pageNumber = 1;
            getHttpData();
        }

        @Override
        public void onStartLoadMore() {
            pageNumber++;
            getHttpData();
        }

        private void getHttpData() {

        }

        @Override
        public void onRecyclerItemClick(int i) {
        }

        @Override
        public void onRecyclerItemChildClick(View view, int postion) {
        }

    }

}

